<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/7/10
 * Time: 15:22
 */
namespace Admin\Model;
use Base\Model\BaseModel;

class MedicalInformationsModel extends BaseModel{
    protected $dbName = 'transplant_userinformation';
    protected $_validate = array(
        array('name', 'require', '名称必须填写'),
        array('content', 'require', '内容必须填写'),
//        array('content', '', '内容必须填写', 0, 'unique', 3),
        array('name', '', '名称不能重复', 0, 'unique', 3),
       array('hit','/^[0-9]+$/', '越界了，点击次数只能输入整数型！',2),
        array('collectnum','/^[0-9]+$/', '越界了，收藏次数只能输入整数型！',2),
    );
    protected $_auto = array(
        array('uptime','mydate','1','callback'),
        array('lastedittime','mydate','3','callback'),
		array('status','1')

    );
    protected function mydate(){
        return date("Y-m-d H:i:s");
    }

}